Ext.define('jwawa.erp.home.HomeShell', {
    extend: 'jwawa.erp.framework.ShellContainer',
    handlerClass:'jwawa.erp.home.HomeHandler',
    requires: ['jwawa.erp.framework.MessageBar',
               'jwawa.erp.framework.TaskTbText',
               'jwawa.erp.framework.ResetTrigger'
    ],
    layout: {
        type: 'border'
    },
    items: [
        {
            id: 'northPanel',
            xtype: 'container',
            region: 'north',
            items: [
                {
                    xtype: 'toolbar',
                    cls: 'border0',
//                    hidden: true,
                    items: [
                        {
                            id: 'logo',
                            xtype: 'tbtext',
                            text: 'Demo ERP'
                        },
                        {
                            xtype: 'tbfill'
                        },
                        {
                            id: 'taskMsgText',
                            width: 500,
                            xtype: 'taskTbText'
                        },
                        {
                            xtype: 'tbseparator'
                        },
                        {
                            id: 'logoffBtn',
                            xtype: 'splitbutton',
                            iconCls: "logoutIcon",
                            text: '退出系统',
                            menu: {
                                xtype: 'menu',
                                width: 120,
                                items: [
                                    {
                                        id: 'changePwdMi',
                                        xtype: 'menuitem',
                                        iconCls: ' passwordIcon',
                                        text: '修改密码'
                                    },
                                    {
                                        id: 'userProfileMi',
                                        xtype: 'menuitem',
                                        text: '我的档案',
                                        iconCls: 'userCardIcon'
                                    },
                                    {
                                        id: 'logoffMi',
                                        xtype: 'menuitem',
                                        text: '退出系统',
                                        iconCls: 'logoutIcon'
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        },        
        {
            id: 'westPanel',
            xtype: 'panel',
            title: '系统菜单',
            width: 173,
            layout: {
                align: 'stretch',
                padding: 0,
                type: 'vbox'
            },
            frame: true,
            collapsible: true,
//            collapseMode:'mini',
            animCollapse: false,
            region: 'west',
            split: true,
            items: [
                {
                    xtype: 'panel',
                    itemId: 'menuFilterInputPanel',
                    border: false,
                    height: 30,
                    bodyStyle:'background-color: #dfe9f6;',
                    layout: {
//                        align: 'stretch',
                        type: 'anchor'
                    },
                    flex: 0,
                    items: [
                        {
                            id: 'menuFilterInput',
                            xtype: 'resetTrigger',
                            emptyText: '请输入菜单缩写...',
                            anchor: '100%',
                            selectOnFocus: true,
                            enableKeyEvents: true
                        }
                    ]
                },
                {
                    id:'menuPanel',
                    xtype: 'container',
                    layout: {
                        type: 'fit'
                    },
                    flex: 1
                }
            ]
        },
        {
            xtype: 'container',
            region: 'center',
            layout: {type: 'border'},
            items: [
                {
                    id: 'contentPanel',
                    xtype: 'tabpanel',
                    region: 'center',
                    layout: {type: 'fit'},
                    margin:  '0px 0px 1px 0px',
                    bodyCls: 'center-region-body'
                },
                {
                    id : 'sysStatusBar',
                    xtype: 'container',
                    region: 'south',
                    height: 18,
                    layout: {
                        type: 'fit'
                    },
                    items: [
                        {
                            id: 'msgBar',
                            xtype: 'messageBar'
                        }
                    ]
                }

            ]
        }
    ]
});